function qhullspawn, points, tetra=tetra
	qhull_path = "D:\sjwelch\qhull-2003.1\qdelaunay.exe"
	qhull_file = 'D:\sjwelch\code\sandbox\qhinvertices.txt'
	qhull_output_postfix='-alf'
	qhull_command = qhull_path + ' TI ' + qhull_file + ' TO ' + $
		qhull_file + qhull_output_postfix + $
		' QT s i'
	str_points = strarr(n_elements(points[0,*]))
	com = ""

	for i=0, n_elements(points[0,*]) - 1 do begin
		str_points[i] = strtrim(strcompress(strtrim(points[0,i],2) + ' ' + strtrim(points[1,i],2) + ' ' + strtrim(points[2,i],2))); + string(13b); + string(11b)
		com = com + str_points[i]
	endfor

	openw, unit, qhull_file, /get_lun
	printf, unit, '3'
	printf, unit, strtrim(n_elements(points[0,*]),2)
	printf, unit, FORMAT='((A))', str_points
	close, unit
	free_lun, unit
	print, qhull_command
	spawn, qhull_command, /log_output;, /hide

	OPENR, unit, qhull_file + qhull_output_postfix, /GET_LUN
	faces = lonarr(2ul^24) ; won't need all that space
	tetrahedra = lonarr(4)
	count = 0ul
	somestring = ""
	READF, unit, FORMAT='((A))', somestring
	while NOT(EOF(unit)) do begin
		v1 = 0
		v2 = 0
		v3 = 0
		v4 = 0
		READF, unit, v1, v2, v3, v4
		tetrahedra = [[tetrahedra],[v1, v2, v3, v4]]
		faces[count:count+3] = [3,  v2, v3, v4]	;each face a triangle, no quads
		count+=4
	endwhile
	close, unit
	free_lun, unit
	faces[count] = -1
	faces = faces[0:count]
	if(arg_present(tetra)) then tetra = tetrahedra[*,1:n_elements(tetrahedra[0,*])-1]
	;now make a IDLitVisPolygon out of them

	;some random colouring
	colour = randomu(systime(1), 3) * 255

	vis = obj_new('IDLitVisPolyline')
	vis-> setproperty, data=points, polylines=faces, $
		name="QHull Triangulations"
	vis -> setproperty, linestyle=6, fill_background=1, fill_color=colour, color=colour, noClose=0, shading=0
	return, vis
end